import 'flutter_plugin_test_method_channel.dart';
import 'flutter_plugin_test_platform_interface.dart';

class FlutterPluginTest {
  ///获取得到平台的版本
  Future<String?> getPlatformVersion() {
    return FlutterPluginTestPlatform.instance.getPlatformVersion();
  }

  ///获取音乐数组
  Future<PositionInfo> getCurrentPosition() {
    return FlutterPluginTestPlatform.instance.getCurrentPosition();
  }

  ///获取音乐数组
  Future<List<Map<String, dynamic>>> initMusics() async {
    return FlutterPluginTestPlatform.instance.initMusics();
  }

  ///获取音乐数组
  Future<String?> playMusic(int index) {
    return FlutterPluginTestPlatform.instance.playMusic(index);
  }

  ///开始或暂停
  Future<String?> startMusic() {
    return FlutterPluginTestPlatform.instance.startMusic();
  }

  ///停止音乐
  Future<String?> stopMusic() {
    return FlutterPluginTestPlatform.instance.stopMusic();
  }

  ///上一首
  Future<String?> lastClick() {
    return FlutterPluginTestPlatform.instance.lastClick();
  }

  ///下一首
  Future<String?> nextClick() {
    return FlutterPluginTestPlatform.instance.nextClick();
  }
}
